package ee.tlnk.service;
 
import java.sql.Date;
import java.sql.Time;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ee.tlnk.dao.RoomDAO;
import ee.tlnk.model.RoomModel;
 
 
/**
 * The Class RoomServiceImpl.
 */
@Service
public class RoomServiceImpl implements RoomService {
 
    /** The room dao. */
    @Autowired
    private RoomDAO roomDAO;
 
    /* (non-Javadoc)
     * @see ee.tlnk.service.RoomService#listRooms()
     */
    @Transactional
    public List<RoomModel> listRooms() {
 
        return roomDAO.listRooms();
    }

	/* (non-Javadoc)
	 * @see ee.tlnk.service.RoomService#listValidatedRooms(java.sql.Date, java.sql.Time, java.sql.Time)
	 */
	@Override
	public List<RoomModel> listValidatedRooms(Date day, Time begin, Time end) {
		 
        return roomDAO.listValidatedRooms(day, begin, end);
	}
 }
